Ride sharing service known as carpooling service allows passengers to share rides with other passengers and for drivers, to utilize empty seats when serving passengers' orders. With the system provided by smart passenger transportation companies like Didi, Uber has made it flexible for people unable to operate a personal vehicle in large urban places to find a ride at a lower price. This system can offer more flexible service with shorter waiting times and higher travel convenience in urban areas, especially in rush hours when regular taxicab services become insufficient. Passenger dispatch and mileage saving are the key problems in the ride-sharing system. This research proposes a novel framework called 'Optimal Passenger Dispatch Approach (OPDA)' in ride-sharing systems based on real time (a) constraints and (b) parameters. This study formulated four real-time constraints and also seven parameters. This approach dispatched a set of new passengers generated in a time epoch and a set of vehicles that are near to the new passenger's origin and satisfy all constraints without violating the constraints of the involved parties. This study conducted a matching-based vehicle recommendation approach (OPDA), which considers multiple objectives of drivers, passengers, and the platform. Passengers and vehicles treated as nodes of a bi-graph, and a maximum weighted matching leads to dispatch the orders. The objectives have been set to overcome the constraints and improve the system by considering highest number of parameters that have valuable impacts. We demonstrated the significance of ride-sharing compared to regular non-shared vehicle service and nearest vehicle recommendation based on a simulation model of both systems.