11 Commits

Author SHA1 Message Date
Sam (OpenClaw) 44a6df9804 Upgrade .NET Core 2.0 → .NET 10, add LianjiaHouseSpider demo
## Major Changes

- Upgrade all 9 projects from netcoreapp2.0 to net10.0
- Update NuGet packages to latest compatible versions:
  - HtmlAgilityPack → 1.11.61
  - log4net → 2.0.17
  - Microsoft.Extensions.Configuration* → 8.0.0
  - Newtonsoft.Json → 13.0.3
  - StackExchange.Redis → 2.7.33
  - MongoDB.Driver → 2.25.0
  - Microsoft.NET.Test.Sdk → 17.9.0, MSTest → 3.2.0
- Remove ZooKeeperNetEx (no .NET 8/10 compatible version)
- Remove HtmlAgilityPack.CssSelectors.NetCore → replaced with Fizzler.Systems.HtmlAgilityPack
- Exclude ZooKeeper-dependent files: ZookeeperConfigProvider, ConfigProviderFactory, DefaultConfigProvider
- Add .gitignore
- Fix source code API changes from package upgrades (QuerySelectorAll, etc.)

## New Demo Project

- NScrapy.Demo: LianjiaHouseSpider - crawls Beijing rental listings
  - Runs in InMemory mode (no ZooKeeper/Redis required)
  - Outputs results to CSV
  - Demonstrates NScrapy framework usage
2026-03-28 20:56:20 +08:00
Elendil 46086ffaf9 ConfigProvider update
Create a ConifgProviderFactory so thay we can get ConfigProvider from a single point
Also enhenced the logic of refresh config, right now when zookeeper watcher dected the config is changed
NScrapy will update its context, and during that time, NScrapy will lock the access to the Connection of Redis
2018-07-04 23:31:44 +08:00
Elendil 5a0ff77c8c ZKConfigProvider v0.1 2018-07-04 00:11:40 +08:00
Elendil 723a51ea62 Init ConfigManagement Component
Will use Zookeeper to manager the config for every node
Also changed some methed name in old design for the purpose of align naming practice
2018-06-27 01:31:28 +08:00
Elendil 3622c13fea individual downloader shell will update its downloader status to Redis
This is for the purpose of web console displaying distributed downloader status in the new future
2018-05-31 23:42:04 +08:00
Elendil 00f90d9492 Change the response from Topic to Queue so that multiple Spider won't process the same response duplicate
Add lock to response pick logic
2018-05-10 02:04:54 +08:00
Elendil c73765d4e4 Redis Lock Added
Add a locker before getting url from receiverqueue, so that multiple downloader won't confilct
2018-05-09 22:45:49 +08:00
Elendil 2ed341c009 Add Distributed Support for Spider
Still need some investigate against that if the spider will crawl the same page while there are multiple spider running
2018-05-09 01:30:43 +08:00
Elendil a47b109a2e Distributed Downloader Version 0.1
A big step for NScrayp, it can now utilize multiple Downloaders
Downloaders are now distributed to different process/machine, the connection
between Downloader and Spider is based on Scheduler, the scheduler distribute
Downloader task to different Downloader through Redis MQ
Details can be configed in appsetting.json
NScrapy still support single process mode, as long as we specify the run mode to InMemory
2018-05-06 22:57:39 +08:00
Elendil f7514b07cb Json Serialize Response from Downloader and Compress the Serialized Json to GZip
After Compressed the Response, tie the compressed str with url then put that pair in Specific Topic

Spider on the other hand will consume the message that published to the specific topic and do analysis
2018-05-04 01:27:53 +08:00
Elendil 46cf06b664 Create DownloaderShell Project to make Downloader Distributeable
Make a wrap of Downloader named DownloaderShell, so that it can handle
request sent from Redis, which is actually pushed in to the specific Queue defined in appsetting.json

Not finished yet
2018-05-04 00:26:46 +08:00