Adding onto the other Educator's response, I'll offer these additional similarities that I notice between the Hughes poem "Pushcart Man" and Joyce's Dubliners:
1. Some characters have no names and appear to live in shadows, like the titular Pushcart Man as well as the girl in Dubliners known only as Mangan's sister.
2. The poem "Pushcart Man" appears as part of a collection of stories in a literally poetic form, while Dubliners is a collection of stories written in highly poetic prose.
3. Both texts are rich in figurative language which creates a sense of exciting, almost magical motion, such as the line "pushing shadows away" from the poem and the line "shook music from the buckled harness" from Dubliners.
Also, since you asked for a contrast as well between the texts, let's notice how bright and joyful the tone is in "Pushcart Man," and how consistently dark and ominous the tone is throughout Dubliners.
Now, interestingly, Langston Hughes also wrote a short story called "Pushcart Man," which might have been the work you were originally asking about.
In that case, let's compare and contrast that story with those of James Joyce in Dubliners:
1. Some scenes in both texts take place in crowded cities, especially rowdy bars.
2. Both texts touch on serious issues of poverty, religion, violence, and childhood strife, as well as figurative blindness (and in the case of "Pushcart Man," literal blindness).
3. While the stories in Dubliners rely a great deal on narration and description, the "Pushcart Man" story relies almost entirely on dialogue.
4. In both texts, some characters are named, while others are simply known by various titles, such as, in the story "Pushcart Man," "the girl," "the Sport Shirt," and of course, the character known as "the Pushcart Man."