As Krishna suggested u can refer that details given
Deployment Options - SAP NetWeaver Gateway Foundation (SAP_GWFND) - SAP Library
1. Yes u can do that and that is called as Hub Architecture. Where everything is done in GW and connection to ECC is only through RFC's.
2. U can call your custom logic/code as well in DPC but this can be only in Embedded Architecture.
Where service registration is only on GW and rest all is done in ur ECC.
Both has got its own Advantages & Disadvantages.
U can design based on ur requirement.
Regards,
Ashwin